package com.lw.question04;

/**
 * @author LW
 * @2020/9/14 11:29
 */
public class Student{

    private String id;
    private String name;

    public static void main(String[] args) {
        CollegeStu collegeStu = new CollegeStu("1","张三","java");
        System.out.println(collegeStu.getId());
    }

    public static class CollegeStu extends Student{
        private String id;
        private String name;
        private String subject;

        public CollegeStu(String id, String name, String subject) {
            this.id = id;
            this.name = name;
            this.subject = subject;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getSubject() {
            return subject;
        }

        public void setSubject(String subject) {
            this.subject = subject;
        }
    }

}
